<%@ page language="java"   pageEncoding="UTF-8"%>
<%@ page import="net.sapfree.user.vo.UserVO"%>
<%@ taglib uri="/WEB-INF/sapfree-info.tld" prefix="sap" %>

<%
String path = request.getContextPath();
String personuuid = request.getAttribute("personuuid")==null?"":request.getAttribute("personuuid").toString();
String inviteCode = request.getAttribute("inviteCode")==null?"":request.getAttribute("inviteCode").toString();
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=7" />

<title>飞客网</title>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
</style>
<link href="<%=path%>/include/styleBase/css/ostable.css" rel="stylesheet"></link>
<link href="<%=path%>/include/styleBase/css/leftPage.css" rel="stylesheet"></link>
<link href="<%=path%>/include/styleBase/css/tagStyle.css" rel="stylesheet"></link>
<link href="<%=path%>/include/styleBase/css/fontStyle.css" rel="stylesheet"></link>

<link href="<%=path%>/include/styleBase/css/headfoot.css" rel="stylesheet"></link>
<script type="text/javascript" src="<%=path%>/include/styleBase/js/jquery.js"></script>
<script type="text/javascript" src="<%=path%>/include/styleBase/js/style.js"></script>
<script type="text/javascript">
function getinvitecode(){
	alert("sadfasdf");
	$.ajax({
			type: "POST", url: "<%=path%>/mypage/myfree?method=getInviteCode",
		data:$("#frm").serialize(),
		error:function(){alert("与服务器失去联系，请刷新本页面后再重试！");},
		success: function(msg){
			var invitecode = eval(msg);
			alert(invitecode);
			alert(invitecode.length);
			for(var i=0;i<invitecode.length;i++){
			//页面去除img的属性
			$("#invitecodeshow").append(invitecode[i].IR_INVITECODE);
			}
		}
	});
 }
 
 function sendmail(){
 	alert(11);
 	frm.action="<%=request.getContextPath()%>/mypage/myfree?method=sendInviteMail&personuuid=<%=personuuid%>";
	frm.submit();
 }
</script>
</head>

<body>
 <!--#include file="top.htm"-->
<form name="frm">
<input type="hidden" name="method" value="sendInviteMail" /> 
<input type="hidden" name="personuuid" value="<%=personuuid%>" />
<%//@include file="../include/jsp/top.jsp"%>
    		 <jsp:include   page="../include/jsp/top.jsp"    flush="true">   
		          <jsp:param    name="funid"    value="1"    />   
			 </jsp:include>

<table border="0" cellpadding="0" cellspacing="0" width="1000" align="center">
	<tr>
    	<td width="190" valign="top" align="left" >
        	<%@include file="../include/jsp/personphoto.jsp"%> 
        	<!--左侧功能导航区-->
        	<%@include file="../include/jsp/myfunction.jsp"%>        
        	<!--左侧功能导航区-->        
        </td>
        <td width="10"></td>
        <td width="550" valign="top" align="left">
        <table border="0" cellpadding="0" cellspacing="0" width="100%">
        <tr>
        	<td height="30" class="blackBold12">直接发送Email邀请</td>
        </tr>
        <tr>
        	<td align="left">
            <table border="0" cellpadding="0" cellspacing="0" width="500">
            	<tr><td class="blackNormal12" height="30">请输入朋友邮件地址，填写多个邮件时，请用";"分隔：</td></tr>
                <tr>
                  <td><textarea name="invitemail" cols="70" rows="3"></textarea></td>
              </tr>
                <tr><td height="30" align="right"><input type="button" value="发送邀请邮件" onclick="javascript:sendmail();" /></td></tr>
            </table>
            </td>
        </tr>
        <tr>
        	<td height="15"></td>
        </tr>
        <tr>
        	<td height="30" class="blackBold12">通过其他方式发送邀请码</td>
        </tr>
        <tr>
        	<td height="30" class="blackNormal12">请将邀请码发送给您的朋友，一个邀请码只能注册一个账号，如果您要邀请多人，请点击“<a href="#" onclick="javascript:getinvitecode()">获取更多邀请码</a>”</td>
        </tr>
        <tr>
        	<td align="left">
            <table border="0" cellpadding="0" cellspacing="1" width="530" bgcolor="#CCCCCC">
            <tr>
            	<td bgcolor="#FFFFFF" class="blueBold14" align="center" height="50">
				<div id="invitecodeshow" ><%=inviteCode%></div>
                </td>
            </tr>
            </table>
            </td>
        </tr>
        
        </table>
            <!--中间主信息展示区-->
            <!--中间主信息展示区-->        
        </td>
        
        <td width="10"></td>
        <td width="160" valign="top" align="left">
        	<input type="button" value="邀请好友" onclick="window.location.href='<%=path%>/mypage/myfree?method=inviteFriend'"/>
            <!--右侧动态信息区-->
            <%@include file="../include/jsp/leftfunction.jsp"%>
            <!--右侧动态信息区-->        
        </td>
    </tr>
</table>
<br/>
<table border="0" cellpadding="0" cellspacing="0" width="1000" align="center">
	<tr><td height="10"></td></tr>
	<tr><td><hr color="#999999" size="1" width="100%"></td></tr>
	<tr>
    	<td align="center" height="25">
        （C） 2011-2016 Sapfree.com
        </td>
    </tr>
    <tr>
    	<td align="center" height="25">
        联系我们&nbsp;&nbsp;隐私声明&nbsp;&nbsp;使用条款&nbsp;&nbsp;版权商标&nbsp;&nbsp;网站地图
        </td>
    </tr>
</table>
<br/><br/>

</form>
</body>
</html>